<?xml version="1.0" encoding="utf-8" ?>
<Content type="xform" name="EditPage">
  <model>
    <instance>
      <tblContentStructure>
        <nStructKey/>
        <nStructParId/>
        <cStructForiegnRef/>
        <cStructName/>
        <cStructDescription>
          <!-- SEE COMMENTS IN BIND -->
          <DisplayName title="" linkType="internal" exclude="false" noindex="false" nonav="false" navpad="true"/>
          <Images>
            <img class="icon" />
            <img class="thumbnail" />
            <img class="detail" />
          </Images>
          <Description/>
        </cStructDescription>
        <cUrl/>
        <nStructOrder/>
        <cStructLayout>Modules_1_column</cStructLayout>
		    <cVersionLang/>
        <nAuditId/>
        <nAuditKey/>
        <dPublishDate/>
        <dExpireDate/>
        <dInsertDate/>
        <nInsertDirId/>
        <dUpdateDate/>
        <nUpdateDirId/>
        <nStatus>0</nStatus>
        <cDescription/>
      </tblContentStructure>
    </instance>
    <submission id="EditPage" action="" method="post" event="form_check(this)"/>
    <bind id="nStructParId" nodeset="tblContentStructure/nStructParId" required="true()" type="string"/>
    <bind id="cStructName" nodeset="tblContentStructure/cStructName" required="true()" type="string"/>
    <bind nodeset="tblContentStructure/cStructDescription">   
      <!-- DISPLAY NAME!! 
            Due to a considerable Content upgrade across all v4 DB's,
            and large component changes across the board.
            All Page settings are being added as Attributes on DisplayName.
            This is not ideal, and will be addressed in the next componant version of EW.
            CONS - DisplayName has multiple nodes in 'samepage/multi-language' sites, 
            so multiple binds for all Page settings will need to be duplicated for each language variation.
            Does not effect different 'directorybased/multilanguage' sites.
            WH - 2011-02-23
      -->
      <bind id="cDisplayName" nodeset="DisplayName" required="false()" type="string"/>
      <bind nodeset="DisplayName">
        <bind id="cLinkTitle" nodeset="@title" required="false()" type="string"/>
        <bind id="cLinkType" nodeset="@linkType" required="true()" type="string"/>
        <bind id="cXcludeFromSiteNav" nodeset="@exclude" required="false()" type="string"/>
        <bind id="cXcludeFromSearchEngines" nodeset="@noindex" required="false()" type="string"/>
        <bind id="cXcludeNav" nodeset="@nonav" required="false()" type="string"/>
        <bind id="cNavPadding" nodeset="@navpad" required="false()" type="string"/>
        <bind id="Screens" nodeset="@screens" required="false()" type="string"/>
        <bind id="cIcon" nodeset="@icon" required="false()" type="string"/>
        <bind id="uploadIcon" nodeset="@uploadIcon" required="false()" type="string" />
        <bind id="bParalaxLoad" nodeset="@paralaxLoad" required="false()" type="string" />
      </bind>
      <bind id="cStructDescription" nodeset="Description" required="false()" type="string"/>
      <bind id="thumbnail" nodeset="Images/img[@class='thumbnail']" required="false()" type="xml-replace"/>
    </bind>
	<bind id="cVersionLang" nodeset="tblContentStructure/cVersionLang" required="false()" type="string"/>
    <bind id="cUrl" nodeset="tblContentStructure/cUrl" required="false()" type="string"/>
    <bind id="dPublishDate" nodeset="tblContentStructure/dPublishDate" required="false()" type="string"/>
    <bind id="dExpireDate" nodeset="tblContentStructure/dExpireDate" required="false()" type="string"/>
    <bind id="nStatus" nodeset="tblContentStructure/nStatus" required="true()" type="string"/>
    <bind id="cDescription" nodeset="tblContentStructure/cDescription" required="false()" type="string"/>
  </model>
  <label>Add/Edit Page</label> 
  <group ref="EditPage" class="2col">
    <group>
      <group>
        <label>Page Settings</label>
        <input bind="nStructParId" class="hidden">
          <label>ParId</label>
        </input>
        <input bind="dPublishDate" class="calendar">
          <label>Publish date</label>
        </input>
        <input bind="dExpireDate" class="calendar">
          <label>Expire date</label>
        </input>
        <select1 bind="nStatus" appearance="full">
          <label>Status</label>
          <item>
            <label>Live</label>
            <value>1</value>
          </item>
          <item>
            <label>Hidden</label>
            <value>0</value>
          </item>
        </select1>
          <select1 bind="cXcludeFromSiteNav" appearance="full" class="">
            <label class="bold-label">Exclude from navigation</label>
            <item>
              <label>Yes</label>
              <value>true</value>
            </item>
            <item>
              <label>No</label>
              <value>false</value>
            </item>
            <help class="inline">
              <p>If Yes, this page and all of it's children will NOT be displayed in any of the site's menu's or automated navigation such as;</p>
              <ul>
                <li>Main and sub navigation</li>
                <li>user sitemaps</li>
              </ul>
              <p>However the page can still be live, and you can link to it manually within the content, and may still be picked up by search engines.</p>
            </help>
          </select1>
          <select1 bind="cXcludeNav" appearance="full">
            <label class="bold-label">Hide navigation bar on this page</label>
            <item>
              <label>Yes</label>
              <value>true</value>
            </item>
            <item>
              <label>No</label>
              <value>false</value>
            </item>
            <help class="inline">
              <p>If Yes, this page will not contain the main or sub navigation, useful for creating squeeze pages</p>
            </help>
          </select1>
        <select1 bind="cNavPadding" appearance="full">
          <label class="bold-label">Padding below main menu</label>
          <item>
            <label>Yes</label>
            <value>true</value>
          </item>
          <item>
            <label>No</label>
            <value>false</value>
          </item>
          <help class="inline">
            <p>By default, pages have some space below the main menu, but if you would like content to start directly below the main menu, for example if you have a banner at the top of the page, select "no"</p>
          </help>
        </select1>
          <select1 bind="cXcludeFromSearchEngines" appearance="full">
            <label class="bold-label">Exclude from search engines</label>
              <item>
                  <label>Yes</label>
                  <value>true</value>
              </item>
              <item>
                  <label>No</label>
                  <value>false</value>
              </item>
              <help class="inline">
                  <p>If Yes, this page will indicate to search engine 'bots or spiders' not to follow this link, and not to index and record the content within the page. It will also exclude from search engine sitemaps.</p>
              </help>
          </select1>
        <select1 bind="bParalaxLoad" appearance="full">
          <label class="bold-label">Paralax Load</label>
          <item>
            <label>Yes</label>
            <value>true</value>
          </item>
          <item>
            <label>No</label>
            <value>false</value>
          </item>
          <help class="inline">
            <p>If Yes, this page will load in beneath its parent page and clicking the link will scroll to the start.</p>
          </help>
        </select1>
        <select bind="Screens" appearance="full" class="multiline bs-only">
          <label class="bold-label">Hide Page from Screens</label>
          <item>
            <label>extra small (phones) under 768px</label>
            <value>xs</value>
          </item>
          <item>
            <label>small (tablets) 768px or over</label>
            <value>sm</value>
          </item>
          <item>
            <label>medium (desktops) 992px or over </label>
            <value>md</value>
          </item>
          <item>
            <label>large (desktops) 1200px or over </label>
            <value>lg</value>
          </item>
        </select>
      </group>
      <group>
        <label>Images</label>
      
      <input bind="thumbnail" class="short pickImage">
        <label>Thumbnail image</label>
      </input>
      </group>
      <group>
        <label>Icon</label>
        <select1 bind="cIcon" class="iconSelect ewQuery bs-only" query="availableIcons" appearance="minimal">
          <label>Icon</label>
          <item>
            <label>None</label>
            <value>false</value>
          </item>
        </select1>
        <input bind="uploadIcon" class="pickImageFile bs-only">
          <label>Upload icon from file</label>
          <value></value>
        </input>
      </group>
    </group>
    <group class="col2">
      <group class="inline">
        <label>Page Names</label>
        <input bind="cStructName" class="required">
          <label>Page name</label>
          <help class="inline">
            <p>
              <strong>Required. </strong>
              <span>Name of the page that is also used to make up the URL of the page.</span>
              </p>
            <p>Cannot contain any special characters such as; <strong>&amp; $ £ " ! % ^ * ( )</strong> etc...</p>
            <p>e.g. For a terms and conditions page enter;</p>  
            <p>"Terms <strong>and</strong> Conditions" in Page name,<br/>and<br/>"Terms <strong>&amp;</strong> Conditions" in Display name</p>
          </help>
        </input>
        <input bind="cDisplayName">
          <label>Display name</label>
          <help class="inline">
            <p><strong>Optional. </strong>Only needs to be used if;</p>
            <ul>
              <li>Page name contains non-web safe characters</li>
              <li>You want the name that appears in the site's navigation to differ to the page name</li>
            </ul>
          </help>
        </input>
        <select1 bind="cVersionLang" class="ewQuery" query="Language">
          <label>Language</label>
        </select1>
      </group>
      <group>
        <label>Page Navigation and Links</label>
        <select1 bind="cLinkType" appearance="full">
          <label>Type of link</label>
          <item>
            <label>Internal</label>
            <value>internal</value>
            <toggle case="cLinkType_1" event="DOMActivate"/>
            <help class="inline">
              <p>
                <strong>Internal</strong>
              </p>
              <p>
                Leave as 'Not Specified' for normal behaviour.<br/>Or select a different page for this page to link to
              </p>
            </help>
          </item>
          <item>
            <label>External (Link to another website)</label>
            <value>external</value>
            <toggle case="cLinkType_2" event="DOMActivate"/>
            <help class="inline">
            <p>
              <strong>External</strong>
            </p>
            <p>Links for this page will open up another URL in a new window</p>
          </help>
          </item>        
        </select1>
        <switch class="disable">
          <case id="cLinkType_1">
            <select1 bind="cUrl" class="siteTree">
              <label>Redirect this page to</label>
            </select1>
          </case>
          <case id="cLinkType_2">
            <input bind="cUrl" class="long">
              <label>URL</label>
            </input>
          </case>
        </switch>
        <input bind="cLinkTitle" class="long keep_empty">
          <label>Link title text</label>
          <help class="inline">
            <p>The title text for a link is the little hint that appears when the user mouses over a hyperlink.</p>
            <p>Configuring what appears here can aid user direction, and sometimes offer SEO advantages.</p>
            <p>If left blank, the page name or display name acts as the title text.</p>
          </help>
        </input>
      </group>
      <group>
        <label>Page Description</label>
        <textarea bind="cStructDescription" class="xhtml" rows="10">
          <label>Description</label>
        </textarea>
      </group>
    </group>
    <submit submission="" ref="submit" class="principle">
      <label>Save Page</label>
    </submit>
  </group>   
</Content>
